package com.sunyuechao.vhr.framework.entity;

/**
 * Created by SunYuechao on 2024/1/29 下午3:19
 */
public class RespBean {
    private Integer status;
    private String messages;
    private Object data;

    public static RespBean ok(String messages,Object data){
        return new RespBean(200,messages,data);
    }
    public static RespBean ok(String messages){
        return new RespBean(200,messages,null);
    }
    public static RespBean error(String messages,Object data){
        return new RespBean(500,messages,data);
    }
    public static RespBean error(String messages){
        return new RespBean(500,messages,null);
    }


    private RespBean() {
    }

    private RespBean(Integer status, String messages, Object data) {
        this.status = status;
        this.messages = messages;
        this.data = data;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMessages() {
        return messages;
    }

    public void setMessages(String messages) {
        this.messages = messages;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
